<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" layout:decorator="base/layout.html">


    <!-- start: Content -->
    <div layout:fragment="content" class="main ">

        <div class="row">
            <div class="col-lg-12">
                <ol class="breadcrumb">
                    <li><i class="fa fa-home"></i><a href="index.html">主页</a></li>

                    <li><i class="fa fa-indent"></i>重置密码</li>
                </ol>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2><i class="fa fa-indent red"></i><strong>重置密码</strong></h2>
                    </div>
                    <div class="panel-body">
                        <form id="modularForm"  method="post" enctype="multipart/form-data" class="form-horizontal ">

                            <input type="hidden" name="id" th:value="${id}" />



                            <div class="form-group">
                                <label class="col-md-3 control-label" for="text-input">密码</label>
                                <div class="col-md-2">
                                    <input type="password" id="text-input" name="password" class="form-control">
                                    <span class="help-block">请输入密码</span>
                                </div>
                            </div>




                            <br>

                    </div>
                    <div class="panel-footer">
                        <button id="submitBtn" type="button" class="btn btn-sm btn-success"><i class="fa fa-dot-circle-o"></i> 提交</button>
                        <button type="reset" class="btn btn-sm btn-danger"><i class="fa fa-ban"></i>重置</button>
                    </div>
                    </form>
                </div>
            </div>


        </div><!--/.row-->


        <script>

            $(document).ready(function() {


            })



            $("#submitBtn").on("click",function(){
                $('#modularForm').ajaxSubmit(      //ajax方式提交表单
                    {
                        url: 'resetPassword',
                        type: 'post',
                        success: function (data) {
                            layer.msg("重置成功");
                            setTimeout(function () {
                                //关闭当前弹出的IFrame
                                var index=parent.layer.getFrameIndex(window.name);

                                parent.layer.close(index);
                            },1500);
                        }
                        //clearForm: false,//禁止清楚表单
                        //resetForm: false //禁止重置表单
                    });
            });








        </script>

    </div>




    <!-- end: Content -->

